<!DOCTYPE html>


<html lang="en">
  

    <head>
      <meta charset="utf-8" />
        
      <meta
        name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1"
      />
      <title>自制工具：GBase8s关机状态下导出某个表的全量数据 |  朝花夕拾</title>
  <meta name="generator" content="hexo-theme-ayer">
      
      <link rel="shortcut icon" href="/ww.ico" />
       
<link rel="stylesheet" href="/dist/main.css">

      
<link rel="stylesheet" href="/css/fonts/remixicon.css">

      
<link rel="stylesheet" href="/css/custom.css">
 
      <script src="https://cdn.staticfile.org/pace/1.2.4/pace.min.js"></script>
       
 

      <link
        rel="stylesheet"
        href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-bulma@5.0.1/bulma.min.css"
      />
      <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.19/dist/sweetalert2.min.js"></script>

      <!-- mermaid -->
      
      <style>
        .swal2-styled.swal2-confirm {
          font-size: 1.6rem;
        }
      </style>
    </head>
  </html>
</html>


<body>
  <div id="app">
    
      
    <main class="content on">
      <section class="outer">
  <article
  id="post-自制工具：GBase8s关机状态下导出某个表的全量数据"
  class="article article-type-post"
  itemscope
  itemprop="blogPost"
  data-scroll-reveal
>
  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  自制工具：GBase8s关机状态下导出某个表的全量数据
</h1>
 

      
    </header>
     
    <div class="article-meta">
      <a href="/2023/06/15/%E8%87%AA%E5%88%B6%E5%B7%A5%E5%85%B7%EF%BC%9AGBase8s%E5%85%B3%E6%9C%BA%E7%8A%B6%E6%80%81%E4%B8%8B%E5%AF%BC%E5%87%BA%E6%9F%90%E4%B8%AA%E8%A1%A8%E7%9A%84%E5%85%A8%E9%87%8F%E6%95%B0%E6%8D%AE/" class="article-date">
  <time datetime="2023-06-15T12:29:14.000Z" itemprop="datePublished">2023-06-15</time>
</a> 
  <div class="article-category">
    <a class="article-category-link" href="/categories/GBase8s/">GBase8s</a>
  </div>
  
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> Word count:</span>
            <span class="post-count">10.7k</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> Reading time≈</span>
            <span class="post-count">63 min</span>
        </span>
    </span>
</div>
 
    </div>
      
    <div class="tocbot"></div>




  
    <div class="article-entry" itemprop="articleBody">
       
  <h1 id="自制工具：GBase8s关机状态下导出某个表的全量数据"><a href="#自制工具：GBase8s关机状态下导出某个表的全量数据" class="headerlink" title="自制工具：GBase8s关机状态下导出某个表的全量数据"></a>自制工具：GBase8s关机状态下导出某个表的全量数据</h1><h2 id="问题："><a href="#问题：" class="headerlink" title="问题："></a>问题：</h2><pre><code>    在生产环境中，如果遇到没用备份，同时数据库库实例也无法启动，的情况。 如何抢救表的数据呢？
</code></pre>
<h2 id="答案："><a href="#答案：" class="headerlink" title="答案："></a>答案：</h2><pre><code>    此文可以解答这个问题，通过这个工具，我们可以实现表数据的抢救。
</code></pre>
<h2 id="前提："><a href="#前提：" class="headerlink" title="前提："></a>前提：</h2><ol>
<li>我们知道要抢救的数据库名称：例如 db1</li>
<li>我们知道要抢救的表名称：例如 tab01</li>
<li>我们知道要抢救表的表结构语句：例如：create table tab01 (id int,name char(9) ,addr varchar(9));</li>
<li>我们实例不能正常启动，但是我们这个表的数据页并没有备格式化或损坏。</li>
</ol>
<h2 id="使用介绍："><a href="#使用介绍：" class="headerlink" title="使用介绍："></a>使用介绍：</h2><h3 id="数据抢救–流程概述："><a href="#数据抢救–流程概述：" class="headerlink" title="数据抢救–流程概述："></a>数据抢救–流程概述：</h3><ul>
<li><p>在无法启动的坏实例上：（老生产环境）</p>
<ul>
<li><p>读取磁盘提取到tab01表所在的partation页和数据页。</p>
</li>
<li><p>通过dd下载这些页。</p>
</li>
</ul>
</li>
<li><p>在新的GBase8s实例上：（手术台）</p>
<ul>
<li><p>在新的GBase8s数据库实例上创建空表tab01。</p>
</li>
<li><p>dd修改空表的partation页使之和老实例基本上一致。</p>
</li>
<li><p>dd修改空表的数据页使之和老实例基本上一致。</p>
</li>
<li><p>使用unload select语句导出表的全量数据。</p>
</li>
</ul>
</li>
<li><p>在新的生产实例上：（新生产环境）</p>
<ul>
<li><p>创建表。</p>
</li>
<li><p>导数数据。</p>
</li>
</ul>
</li>
</ul>
<h3 id="先准备好“手术刀”："><a href="#先准备好“手术刀”：" class="headerlink" title="先准备好“手术刀”："></a>先准备好“手术刀”：</h3><h4 id="手术刀工具介绍："><a href="#手术刀工具介绍：" class="headerlink" title="手术刀工具介绍："></a>手术刀工具介绍：</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 GBase8sL3]$ cp a b</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$ dd1 a b 1 2 2 3 1 1</span><br><span class="line">if=a of=b skip=1 seed=2 bs=2 count=3 itw=1 otw=1</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$ cat a</span><br><span class="line">aaaaabbbbb</span><br><span class="line">cccccddddd</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$ cat b</span><br><span class="line">1111aaabbb</span><br><span class="line">3333344444</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>注明：dd1 工具随文档发放源码，可以自行领取。</p>
<pre><code>        dd1 工具是我自己写的用来做patch的工具，因为系统默认的dd工具会有不可控情况，所以自编了一个dd1工具。
</code></pre>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdlib.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;string.h&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="type">void</span> <span class="title function_">dddd</span><span class="params">(<span class="type">char</span> *ifile, <span class="type">char</span> *ofile, <span class="type">int</span> skip, <span class="type">int</span> seek, <span class="type">int</span> bs, <span class="type">int</span> count, <span class="type">int</span> itw, <span class="type">int</span> otw)</span> </span><br><span class="line">&#123;</span><br><span class="line">    FILE *i;</span><br><span class="line">    FILE *o;</span><br><span class="line">    i = fopen(ifile,<span class="string">&quot;r&quot;</span>);</span><br><span class="line">    o = fopen(ofile,<span class="string">&quot;r+&quot;</span>);</span><br><span class="line">    <span class="keyword">if</span> ( i == <span class="literal">NULL</span> )&#123;</span><br><span class="line">        <span class="built_in">printf</span>(<span class="string">&quot;打开文件时出错：%s\n&quot;</span>, ifile);</span><br><span class="line">        <span class="built_in">exit</span>(<span class="number">1</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> ( o == <span class="literal">NULL</span> )&#123;</span><br><span class="line">        <span class="built_in">printf</span>(<span class="string">&quot;打开文件时出错：%s\n&quot;</span>, ofile);</span><br><span class="line">        <span class="built_in">exit</span>(<span class="number">1</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">    <span class="comment">//初始化文件指针位置</span></span><br><span class="line">    <span class="keyword">if</span> ( itw == <span class="number">-1</span> ) &#123;   <span class="comment">//如果itw为-1,那么跳到文件末尾，skip将视作为负数</span></span><br><span class="line">        fseek(i,<span class="number">0</span>,SEEK_END);</span><br><span class="line">        skip=skip*(<span class="number">-1</span>);</span><br><span class="line">    &#125; <span class="keyword">else</span> <span class="keyword">if</span> ( itw == <span class="number">1</span>) &#123;</span><br><span class="line">        fseek(i,<span class="number">0</span>,SEEK_SET);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="built_in">printf</span>(<span class="string">&quot;入参itw不符合要求(1/-1)：%d&quot;</span>, itw);</span><br><span class="line">        <span class="built_in">exit</span>(<span class="number">1</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span> ( otw == <span class="number">-1</span> ) &#123;   <span class="comment">//如果otw为-1,那么跳到文件末尾，seek将视作为负数</span></span><br><span class="line">        fseek(o,<span class="number">0</span>,SEEK_END);</span><br><span class="line">        seek=seek*(<span class="number">-1</span>);</span><br><span class="line">    &#125; <span class="keyword">else</span> <span class="keyword">if</span> ( otw == <span class="number">1</span> ) &#123;</span><br><span class="line">        fseek(o,<span class="number">0</span>,SEEK_SET);</span><br><span class="line">    &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">        <span class="built_in">printf</span>(<span class="string">&quot;入参otw不符合要求(1/-1)：%d&quot;</span>, otw);</span><br><span class="line">        <span class="built_in">exit</span>(<span class="number">1</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">    <span class="comment">//读取字节：</span></span><br><span class="line">    <span class="type">char</span> inbyte[count*bs];</span><br><span class="line">    fseek(i,skip*bs,SEEK_CUR);</span><br><span class="line">    fread(inbyte,<span class="keyword">sizeof</span>(inbyte),<span class="number">1</span>,i);</span><br><span class="line">    </span><br><span class="line">    <span class="comment">//patch字节：</span></span><br><span class="line">    fseek(o,seek*bs,SEEK_CUR);</span><br><span class="line">    fwrite(inbyte,<span class="keyword">sizeof</span>(inbyte),<span class="number">1</span>,o);</span><br><span class="line">    </span><br><span class="line">    fclose(i);</span><br><span class="line">    fclose(o);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="type">int</span> <span class="title function_">main</span><span class="params">(<span class="type">int</span> canshunum,<span class="type">char</span> *canshu[])</span>&#123;</span><br><span class="line">    <span class="type">char</span> ifile[<span class="number">100</span>] ;</span><br><span class="line">    <span class="type">char</span> ofile[<span class="number">100</span>] ;</span><br><span class="line">    <span class="built_in">strcpy</span>(ifile,canshu[<span class="number">1</span>]); </span><br><span class="line">    <span class="built_in">strcpy</span>(ofile,canshu[<span class="number">2</span>]); </span><br><span class="line">    <span class="type">int</span> skip = atoi(canshu[<span class="number">3</span>]);</span><br><span class="line">    <span class="type">int</span> seek = atoi(canshu[<span class="number">4</span>]);</span><br><span class="line">    <span class="type">int</span> bs = atoi(canshu[<span class="number">5</span>]);</span><br><span class="line">    <span class="type">int</span> count = atoi(canshu[<span class="number">6</span>]);</span><br><span class="line">    <span class="type">int</span> itw  = atoi(canshu[<span class="number">7</span>]);</span><br><span class="line">    <span class="type">int</span> otw  = atoi(canshu[<span class="number">8</span>]);</span><br><span class="line">    <span class="built_in">printf</span>(<span class="string">&quot;if=%s of=%s skip=%d seed=%d bs=%d count=%d itw=%d otw=%d\n&quot;</span>,ifile, ofile, skip, seek,  bs, count,  itw, otw);</span><br><span class="line">    dddd(ifile, ofile, skip, seek,  bs, count,  itw, otw);</span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>







<h3 id="数据抢救–例子："><a href="#数据抢救–例子：" class="headerlink" title="数据抢救–例子："></a>数据抢救–例子：</h3><h4 id="老生产环境：创建测试库和测试表"><a href="#老生产环境：创建测试库和测试表" class="headerlink" title="老生产环境：创建测试库和测试表"></a>老生产环境：创建测试库和测试表</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">w01_init_env.sh</span></span><br><span class="line">onmode -ky</span><br><span class="line">onclean -ky</span><br><span class="line">rm -fr /opt/data/*</span><br><span class="line">touch /opt/data/rootchk</span><br><span class="line">touch /opt/data/plogdbs</span><br><span class="line">touch /opt/data/llogdbs</span><br><span class="line">touch /opt/data/tmpdbs01</span><br><span class="line">touch /opt/data/tmpdbs02</span><br><span class="line">touch /opt/data/tmpdbs03</span><br><span class="line">touch /opt/data/tmpdbs04</span><br><span class="line">touch /opt/data/datachk01</span><br><span class="line">chmod 660 /opt/data/*</span><br><span class="line"></span><br><span class="line">sed -i &#x27;s/^FULL_DISK_INIT.*$/FULL_DISK_INIT 1/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &#x27;s/^PHYSFILE.*$/#PHYSFILE/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &#x27;s/^LOGFILES.*$/LOGFILES/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &#x27;s/^LOGSIZE.*$/LOGSIZE/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">oninit -ivy</span><br><span class="line"></span><br><span class="line">onspaces -c -d plogdbs -p /opt/data/plogdbs -o 0 -s 10000 </span><br><span class="line">onspaces -c -d llogdbs -p /opt/data/llogdbs -o 0 -s 10000 </span><br><span class="line">onspaces -c -d tmpdbs01 -p /opt/data/tmpdbs01 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d tmpdbs02 -p /opt/data/tmpdbs02 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d tmpdbs03 -p /opt/data/tmpdbs03 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d tmpdbs04 -p /opt/data/tmpdbs04 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d datadbs01 -p /opt/data/datachk01 -o 0 -k 16 -s `echo &quot;25600*16&quot;|bc`</span><br><span class="line"></span><br><span class="line">sleep 1;</span><br><span class="line">onmode -c</span><br><span class="line">ontape -s -L 0 -t /dev/null</span><br><span class="line"></span><br><span class="line">dbaccess - - &lt;&lt;!</span><br><span class="line">    create database db01 in datadbs01;</span><br><span class="line">    select hex(partnum),tabname from systables;</span><br><span class="line">!</span><br><span class="line"></span><br><span class="line">sleep 1;</span><br><span class="line"></span><br><span class="line">i=2;</span><br><span class="line">while [ $i -le 200 ]</span><br><span class="line">do</span><br><span class="line">dbaccess db01 &lt;&lt;!</span><br><span class="line">    create table t$&#123;i&#125;(id int,name varchar(20), addr char(10)) </span><br><span class="line">    extent size 64 next size 128;</span><br><span class="line">!</span><br><span class="line">let i=$i+1</span><br><span class="line">done</span><br><span class="line"></span><br><span class="line">echo &quot;insert into t6 values(1,&#x27;abcdef&#x27;,&#x27;abcdef1&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(2,&#x27;abcdef&#x27;,&#x27;abcdef2&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(3,&#x27;abcdef&#x27;,&#x27;abcdef3&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(4,&#x27;abcdef&#x27;,&#x27;abcdef4&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(5,&#x27;abcdef&#x27;,&#x27;abcdef5&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(6,&#x27;abcdef&#x27;,&#x27;abcdef6&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(7,&#x27;abcdef&#x27;,&#x27;abcdef7&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(8,&#x27;abcdef&#x27;,&#x27;abcdef8&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(9,&#x27;abcdef&#x27;,&#x27;abcdef9&#x27;); &quot; |dbaccess db01</span><br><span class="line">echo &quot;insert into t6 values(10,&#x27;abcdef&#x27;,&#x27;abcdef10&#x27;); &quot; |dbaccess db01</span><br></pre></td></tr></table></figure>

<h4 id="老生产环境：关闭数据库"><a href="#老生产环境：关闭数据库" class="headerlink" title="老生产环境：关闭数据库"></a>老生产环境：关闭数据库</h4><pre><code>    这里我没有关闭数据库的方式表示，数据库坏了，并无法启动了。
</code></pre>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">onmode -ky</span><br><span class="line">onclean -ky</span><br></pre></td></tr></table></figure>

<h4 id="老生产环境：找到t6表的页"><a href="#老生产环境：找到t6表的页" class="headerlink" title="老生产环境：找到t6表的页"></a>老生产环境：找到t6表的页</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 GBase8sL3]$</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$  ./dumpTBLSpaceAndPE.sh</span><br><span class="line"></span><br><span class="line">DBspace number      DBspace name        Flags               Number of chunks    First chunk         Pagesize</span><br><span class="line">1                   rootdbs             0x60001             1                   1                   2</span><br><span class="line">2                   plogdbs             0x60001             1                   2                   2</span><br><span class="line">3                   llogdbs             0x60001             1                   3                   2</span><br><span class="line">4                   tmpdbs01            0x42001             1                   4                   2</span><br><span class="line">5                   tmpdbs02            0x42001             1                   5                   2</span><br><span class="line">6                   tmpdbs03            0x42001             1                   6                   2</span><br><span class="line">7                   tmpdbs04            0x42001             1                   7                   2</span><br><span class="line">8                   datadbs01           0x60001             1                   8                   16</span><br><span class="line"></span><br><span class="line">Chunk number        Flags               Chunk path                                        Chunk offset        Chunk size          Number of free page DBspace number</span><br><span class="line">1                   0x10040             /opt/data/rootchk                                 0                   512000              351312              1</span><br><span class="line">2                   0x30040             /opt/data/plogdbs                                 0                   5000                4947                2</span><br><span class="line">3                   0x30040             /opt/data/llogdbs                                 0                   5000                4947                3</span><br><span class="line">4                   0x30040             /opt/data/tmpdbs01                                0                   5000                4947                4</span><br><span class="line">5                   0x30040             /opt/data/tmpdbs02                                0                   5000                4947                5</span><br><span class="line">6                   0x30040             /opt/data/tmpdbs03                                0                   5000                4947                6</span><br><span class="line">7                   0x30040             /opt/data/tmpdbs04                                0                   5000                4947                7</span><br><span class="line">8                   0x30040             /opt/data/datachk01                               0                   25600               23905               8</span><br><span class="line">请输入dbs名称：</span><br><span class="line">datadbs01</span><br><span class="line">16384+0 records in</span><br><span class="line">16384+0 records out</span><br><span class="line">16384 bytes (16 kB) copied, 0.0523441 s, 313 kB/s</span><br><span class="line">50+0 records in</span><br><span class="line">50+0 records out</span><br><span class="line">50 bytes (50 B) copied, 0.000194981 s, 256 kB/s</span><br><span class="line">10+0 records in</span><br><span class="line">10+0 records out</span><br><span class="line">10 bytes (10 B) copied, 0.000176686 s, 56.6 kB/s</span><br><span class="line">10+0 records in</span><br><span class="line">10+0 records out</span><br><span class="line">10 bytes (10 B) copied, 0.000125911 s, 79.4 kB/s</span><br><span class="line">10+0 records in</span><br><span class="line">10+0 records out</span><br><span class="line">10 bytes (10 B) copied, 0.000118567 s, 84.3 kB/s</span><br><span class="line">10+0 records in</span><br><span class="line">10+0 records out</span><br><span class="line">10 bytes (10 B) copied, 0.000122428 s, 81.7 kB/s</span><br><span class="line">16 2</span><br><span class="line">      0x0008   0x00000018   0x00000032            8            3           50         16 /opt/data/datachk01</span><br><span class="line">      0x0008   0x00000848   0x00000064            8          265           50         16 /opt/data/datachk01</span><br><span class="line">      0x0008   0x000015d8   0x000000c8            8          699          100         16 /opt/data/datachk01</span><br><span class="line">      0x0008   0x000025b8   0x00000190            8         1207          200         16 /opt/data/datachk01</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">DBspace Usage Report: datadbs01           Owner: wangwei  Created: 05/09/2022</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> Chunk Pathname                             Pagesize(k)  Size(p)  Used(p)  Free(p)</span><br><span class="line">     8 /opt/data/datachk01                           16   xxxxx     xxxxx   xxxxx</span><br><span class="line"></span><br><span class="line"> Description                                                   Offset(p)  Size(p)</span><br><span class="line"> ------------------------------------------------------------- -------- --------</span><br><span class="line"> RESERVED PAGES                                                       0        2</span><br><span class="line"> CHUNK FREELIST PAGE                                                  2        1</span><br><span class="line"> datadbs01:TBLSpace                                                   3       50</span><br><span class="line"> datadbs01:TBLSpace                                                 265       50</span><br><span class="line"> datadbs01:TBLSpace                                                 699      100</span><br><span class="line"> datadbs01:TBLSpace                                                1207      200</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000003 skip=3 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000004 skip=4 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000005 skip=5 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000006 skip=6 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000007 skip=7 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000008 skip=8 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000009 skip=9 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000000a skip=10 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000000b skip=11 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000000c skip=12 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000000d skip=13 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000000e skip=14 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000000f skip=15 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000010 skip=16 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000011 skip=17 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000012 skip=18 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000013 skip=19 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000014 skip=20 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000015 skip=21 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000016 skip=22 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000017 skip=23 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000018 skip=24 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000019 skip=25 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000001a skip=26 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000001b skip=27 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000001c skip=28 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000001d skip=29 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000001e skip=30 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000001f skip=31 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000020 skip=32 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000021 skip=33 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000022 skip=34 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000023 skip=35 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000024 skip=36 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000025 skip=37 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000026 skip=38 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000027 skip=39 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000028 skip=40 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000029 skip=41 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000002a skip=42 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000002b skip=43 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000002c skip=44 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000002d skip=45 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000002e skip=46 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000002f skip=47 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000030 skip=48 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000031 skip=49 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000032 skip=50 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000033 skip=51 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000034 skip=52 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000109 skip=265 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000010a skip=266 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000010b skip=267 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000010c skip=268 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000010d skip=269 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000010e skip=270 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000010f skip=271 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000110 skip=272 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000111 skip=273 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000112 skip=274 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000113 skip=275 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000114 skip=276 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000115 skip=277 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000116 skip=278 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000117 skip=279 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000118 skip=280 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000119 skip=281 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000011a skip=282 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000011b skip=283 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000011c skip=284 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000011d skip=285 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000011e skip=286 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000011f skip=287 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000120 skip=288 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000121 skip=289 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000122 skip=290 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000123 skip=291 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000124 skip=292 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000125 skip=293 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000126 skip=294 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000127 skip=295 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000128 skip=296 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000129 skip=297 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000012a skip=298 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000012b skip=299 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000012c skip=300 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000012d skip=301 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000012e skip=302 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000012f skip=303 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000130 skip=304 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000131 skip=305 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000132 skip=306 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000133 skip=307 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000134 skip=308 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000135 skip=309 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000136 skip=310 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000137 skip=311 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000138 skip=312 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000139 skip=313 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000013a skip=314 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002bb skip=699 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002bc skip=700 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002bd skip=701 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002be skip=702 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002bf skip=703 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c0 skip=704 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c1 skip=705 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c2 skip=706 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c3 skip=707 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c4 skip=708 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c5 skip=709 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c6 skip=710 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c7 skip=711 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c8 skip=712 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002c9 skip=713 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ca skip=714 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002cb skip=715 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002cc skip=716 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002cd skip=717 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ce skip=718 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002cf skip=719 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d0 skip=720 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d1 skip=721 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d2 skip=722 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d3 skip=723 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d4 skip=724 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d5 skip=725 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d6 skip=726 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d7 skip=727 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d8 skip=728 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002d9 skip=729 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002da skip=730 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002db skip=731 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002dc skip=732 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002dd skip=733 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002de skip=734 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002df skip=735 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e0 skip=736 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e1 skip=737 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e2 skip=738 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e3 skip=739 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e4 skip=740 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e5 skip=741 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e6 skip=742 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e7 skip=743 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e8 skip=744 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002e9 skip=745 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ea skip=746 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002eb skip=747 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ec skip=748 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ed skip=749 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ee skip=750 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ef skip=751 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f0 skip=752 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f1 skip=753 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f2 skip=754 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f3 skip=755 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f4 skip=756 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f5 skip=757 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f6 skip=758 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f7 skip=759 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f8 skip=760 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002f9 skip=761 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002fa skip=762 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002fb skip=763 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002fc skip=764 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002fd skip=765 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002fe skip=766 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000002ff skip=767 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000300 skip=768 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000301 skip=769 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000302 skip=770 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000303 skip=771 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000304 skip=772 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000305 skip=773 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000306 skip=774 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000307 skip=775 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000308 skip=776 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000309 skip=777 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000030a skip=778 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000030b skip=779 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000030c skip=780 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000030d skip=781 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000030e skip=782 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000030f skip=783 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000310 skip=784 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000311 skip=785 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000312 skip=786 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000313 skip=787 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000314 skip=788 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000315 skip=789 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000316 skip=790 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000317 skip=791 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000318 skip=792 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000319 skip=793 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000031a skip=794 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000031b skip=795 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000031c skip=796 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000031d skip=797 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000031e skip=798 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004b7 skip=1207 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004b8 skip=1208 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004b9 skip=1209 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ba skip=1210 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004bb skip=1211 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004bc skip=1212 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004bd skip=1213 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004be skip=1214 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004bf skip=1215 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c0 skip=1216 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c1 skip=1217 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c2 skip=1218 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c3 skip=1219 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c4 skip=1220 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c5 skip=1221 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c6 skip=1222 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c7 skip=1223 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c8 skip=1224 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004c9 skip=1225 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ca skip=1226 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004cb skip=1227 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004cc skip=1228 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004cd skip=1229 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ce skip=1230 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004cf skip=1231 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d0 skip=1232 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d1 skip=1233 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d2 skip=1234 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d3 skip=1235 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d4 skip=1236 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d5 skip=1237 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d6 skip=1238 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d7 skip=1239 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d8 skip=1240 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004d9 skip=1241 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004da skip=1242 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004db skip=1243 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004dc skip=1244 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004dd skip=1245 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004de skip=1246 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004df skip=1247 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e0 skip=1248 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e1 skip=1249 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e2 skip=1250 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e3 skip=1251 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e4 skip=1252 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e5 skip=1253 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e6 skip=1254 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e7 skip=1255 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e8 skip=1256 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004e9 skip=1257 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ea skip=1258 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004eb skip=1259 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ec skip=1260 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ed skip=1261 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ee skip=1262 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ef skip=1263 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f0 skip=1264 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f1 skip=1265 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f2 skip=1266 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f3 skip=1267 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f4 skip=1268 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f5 skip=1269 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f6 skip=1270 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f7 skip=1271 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f8 skip=1272 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004f9 skip=1273 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004fa skip=1274 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004fb skip=1275 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004fc skip=1276 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004fd skip=1277 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004fe skip=1278 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x000004ff skip=1279 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000500 skip=1280 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000501 skip=1281 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000502 skip=1282 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000503 skip=1283 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000504 skip=1284 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000505 skip=1285 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000506 skip=1286 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000507 skip=1287 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000508 skip=1288 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000509 skip=1289 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000050a skip=1290 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000050b skip=1291 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000050c skip=1292 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000050d skip=1293 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000050e skip=1294 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000050f skip=1295 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000510 skip=1296 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000511 skip=1297 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000512 skip=1298 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000513 skip=1299 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000514 skip=1300 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000515 skip=1301 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000516 skip=1302 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000517 skip=1303 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000518 skip=1304 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000519 skip=1305 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000051a skip=1306 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000051b skip=1307 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000051c skip=1308 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000051d skip=1309 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000051e skip=1310 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000051f skip=1311 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000520 skip=1312 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000521 skip=1313 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000522 skip=1314 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000523 skip=1315 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000524 skip=1316 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000525 skip=1317 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000526 skip=1318 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000527 skip=1319 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000528 skip=1320 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000529 skip=1321 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000052a skip=1322 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000052b skip=1323 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000052c skip=1324 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000052d skip=1325 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000052e skip=1326 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000052f skip=1327 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000530 skip=1328 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000531 skip=1329 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000532 skip=1330 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000533 skip=1331 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000534 skip=1332 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000535 skip=1333 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000536 skip=1334 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000537 skip=1335 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000538 skip=1336 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000539 skip=1337 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000053a skip=1338 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000053b skip=1339 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000053c skip=1340 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000053d skip=1341 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000053e skip=1342 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000053f skip=1343 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000540 skip=1344 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000541 skip=1345 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000542 skip=1346 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000543 skip=1347 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000544 skip=1348 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000545 skip=1349 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000546 skip=1350 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000547 skip=1351 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000548 skip=1352 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000549 skip=1353 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000054a skip=1354 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000054b skip=1355 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000054c skip=1356 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000054d skip=1357 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000054e skip=1358 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000054f skip=1359 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000550 skip=1360 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000551 skip=1361 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000552 skip=1362 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000553 skip=1363 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000554 skip=1364 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000555 skip=1365 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000556 skip=1366 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000557 skip=1367 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000558 skip=1368 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000559 skip=1369 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000055a skip=1370 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000055b skip=1371 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000055c skip=1372 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000055d skip=1373 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000055e skip=1374 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000055f skip=1375 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000560 skip=1376 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000561 skip=1377 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000562 skip=1378 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000563 skip=1379 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000564 skip=1380 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000565 skip=1381 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000566 skip=1382 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000567 skip=1383 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000568 skip=1384 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000569 skip=1385 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000056a skip=1386 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000056b skip=1387 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000056c skip=1388 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000056d skip=1389 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000056e skip=1390 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000056f skip=1391 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000570 skip=1392 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000571 skip=1393 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000572 skip=1394 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000573 skip=1395 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000574 skip=1396 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000575 skip=1397 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000576 skip=1398 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000577 skip=1399 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000578 skip=1400 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x00000579 skip=1401 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000057a skip=1402 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000057b skip=1403 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000057c skip=1404 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000057d skip=1405 bs=16384 count=1</span><br><span class="line">dd if=/opt/data/datachk01 of=0x008/0x0000057e skip=1406 bs=16384 count=1</span><br><span class="line">请输入你要抢救数据的表所在的数据库名称：</span><br><span class="line">db01</span><br><span class="line">请输入你要抢救数据的表名称：</span><br><span class="line">t6</span><br><span class="line">0000000: 1009 0000 0800 5aff 0538 0208 e000 083f 0000 0000 0000 0000 4b00 8000 0209 0000 2400 0000 0100 0000 0100 0040 47f1 8264 0100 0000 2000 0000 4000 0000 0400 0000 0200 0000 0100 0000 ffff ffff 4b00 8000 0100 0000 0000 0000 0a00 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0a00 0000 0100 0000 0000 0000 0100 0000 0100 0000 0000 0000 0100 0000 0100 0000 bc87 3f02 0000 0000 0000 0000 0000 0000 6462 3031 0067 6261 7365 6462 7400 7436 007a 685f 434e 2e35 3733 3732 0000 0000 0400 0000 0000 1400 0000 0005 0000 0000 0008 0000 12b8 0000 0004 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000  ......Z..8.....?........K.......$..........@G..d.... ...@...................K.....................................................................?.............db01.gbasedbt.t6.zh_CN.57372....................................................................</span><br><span class="line">这个文件就是你要找的partation页！！！  partationDIR/0x00000122</span><br><span class="line">20+0 records in</span><br><span class="line">20+0 records out</span><br><span class="line">20 bytes (20 B) copied, 0.000139988 s, 143 kB/s</span><br><span class="line">10+0 records in</span><br><span class="line">10+0 records out</span><br><span class="line">10 bytes (10 B) copied, 0.000136798 s, 73.1 kB/s</span><br><span class="line">16 2</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">DBspace Usage Report: db01           Owner: wangwei  Created: 05/09/2022</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> Chunk Pathname                             Pagesize(k)  Size(p)  Used(p)  Free(p)</span><br><span class="line">     8 /opt/data/datachk01                           16   xxxxx     xxxxx   xxxxx</span><br><span class="line"></span><br><span class="line"> Description                                                   Offset(p)  Size(p)</span><br><span class="line"> ------------------------------------------------------------- -------- --------</span><br><span class="line"> RESERVED PAGES                                                       0        2</span><br><span class="line"> CHUNK FREELIST PAGE                                                  2        1</span><br><span class="line"> db01:t6                                                            599        4</span><br><span class="line"></span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>注明，可以看到t6表有这些页：</p>
<ol>
<li>#define PG_PARTN     0x0002       &#x2F;* Partition page       *&#x2F;                      partationDIR&#x2F;0x00000122</li>
<li>#define FR_BMORINDEX    0x8     &#x2F;* Index or bitmap page *&#x2F;              db01:t6    599        4</li>
<li>#define PG_DATA      0x0001       &#x2F;* Data page            *&#x2F;                         db01:t6    599        4</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 GBase8sL3]$ xxd partationDIR/0x00000122  |head -30</span><br><span class="line">0000000: 1009 0000 0800 5aff 0538 0208 e000 083f  ......Z..8.....?</span><br><span class="line">0000010: 0000 0000 0000 0000 4b00 8000 0209 0000  ........K.......</span><br><span class="line">0000020: 2400 0000 0100 0000 0100 0040 47f1 8264  $..........@G..d</span><br><span class="line">0000030: 0100 0000 2000 0000 4000 0000 0400 0000  .... ...@.......</span><br><span class="line">0000040: 0200 0000 0100 0000 ffff ffff 4b00 8000  ............K...</span><br><span class="line">0000050: 0100 0000 0000 0000 0a00 0000 0000 0000  ................</span><br><span class="line">0000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000070: 0a00 0000 0100 0000 0000 0000 0100 0000  ................</span><br><span class="line">0000080: 0100 0000 0000 0000 0100 0000 0100 0000  ................</span><br><span class="line">0000090: bc87 3f02 0000 0000 0000 0000 0000 0000  ..?.............</span><br><span class="line">00000a0: 6462 3031 0067 6261 7365 6462 7400 7436  db01.gbasedbt.t6</span><br><span class="line">00000b0: 007a 685f 434e 2e35 3733 3732 0000 0000  .zh_CN.57372....</span><br><span class="line">00000c0: 0400 0000 0000 1400 0000 0005 0000 0000  ................</span><br><span class="line">00000d0: 0008 0000 12b8 0000 0004 0000 0000 0000  ................</span><br><span class="line">00000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">00000f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000100: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000140: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000150: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000160: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000170: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000180: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0000190: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">00001a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">00001b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">00001c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">00001d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$ xxd partationDIR/0x00000122  |tail -10</span><br><span class="line">0003f60: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003f70: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003f80: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003f90: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003fa0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003fb0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003fc0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003fd0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span><br><span class="line">0003fe0: 0000 0000 0000 0000 cc00 1400 cc00 0000  ................</span><br><span class="line">0003ff0: c000 0c00 a000 2000 1800 8800 40f6 0200  ...... .....@...</span><br><span class="line">[gbasedbt@wei07 GBase8sL3]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h4 id="老生产环境：下载t6表的页"><a href="#老生产环境：下载t6表的页" class="headerlink" title="老生产环境：下载t6表的页"></a>老生产环境：下载t6表的页</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line">filePe=&quot;db01:t6.pe&quot;</span><br><span class="line">dbname=&quot;db01&quot;</span><br><span class="line">tabename=&quot;t6&quot;</span><br><span class="line">rootPagesize=2</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Chunk=0</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Pathname=0</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Pagesize=0</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Offset=0</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Size=0</span></span><br><span class="line">cat $filePe |grep -E &quot;xxxxx|$&#123;dbname&#125;:$&#123;tabname&#125;&quot; |awk &#x27;&#123;</span><br><span class="line"><span class="meta prompt_">	if($</span><span class="language-bash">5==<span class="string">&quot;xxxxx&quot;</span>)&#123;</span></span><br><span class="line">		Chunk=$1;</span><br><span class="line">		Pathname=$2;</span><br><span class="line">		Pagesize=$3;</span><br><span class="line">	&#125;else&#123;</span><br><span class="line">	    dbtab=$1;</span><br><span class="line">		Offset=$2;</span><br><span class="line">		Size=$3;</span><br><span class="line">		print dbtab,Chunk,Pathname,Pagesize,Offset,Size ;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;&#x27; &gt; $&#123;dbname&#125;:$&#123;tabename&#125;.pe.line</span><br><span class="line"></span><br><span class="line">rm -fr datapageDIR</span><br><span class="line">mkdir datapageDIR</span><br><span class="line">cat $&#123;dbname&#125;:$&#123;tabename&#125;.pe.line |while read dbtab Chunk Pathname Pagesize Offset Size</span><br><span class="line">do</span><br><span class="line">	i=$Offset</span><br><span class="line">	let e=$Offset+$Size</span><br><span class="line">	while [ $i -lt $e ];do</span><br><span class="line">		outfile=datapageDIR/$&#123;dbtab&#125;_$&#123;i&#125;; &gt;$outfile;</span><br><span class="line">		let skip=$&#123;i&#125;*$&#123;Pagesize&#125;*1</span><br><span class="line">		let seek=0</span><br><span class="line">		let bs=1024</span><br><span class="line">		let count=$&#123;Pagesize&#125;*1</span><br><span class="line">		dd1 $Pathname $outfile $skip $seek $bs $count 1 1</span><br><span class="line">		let i=$i+1</span><br><span class="line">	done</span><br><span class="line">done</span><br></pre></td></tr></table></figure>



<h4 id="手术台上的操作：初始化一个空实例"><a href="#手术台上的操作：初始化一个空实例" class="headerlink" title="手术台上的操作：初始化一个空实例"></a>手术台上的操作：初始化一个空实例</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">w01_init_env_02.sh</span></span><br><span class="line">onmode -ky</span><br><span class="line">onclean -ky</span><br><span class="line">rm -fr /opt/data/*</span><br><span class="line">touch /opt/data/rootchk</span><br><span class="line">touch /opt/data/plogdbs</span><br><span class="line">touch /opt/data/llogdbs</span><br><span class="line">touch /opt/data/tmpdbs01</span><br><span class="line">touch /opt/data/tmpdbs02</span><br><span class="line">touch /opt/data/tmpdbs03</span><br><span class="line">touch /opt/data/tmpdbs04</span><br><span class="line">touch /opt/data/datachk01</span><br><span class="line">chmod 660 /opt/data/*</span><br><span class="line"></span><br><span class="line">sed -i &#x27;s/^FULL_DISK_INIT.*$/FULL_DISK_INIT 1/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &#x27;s/^PHYSFILE.*$/#PHYSFILE/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &#x27;s/^LOGFILES.*$/LOGFILES/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">sed -i &#x27;s/^LOGSIZE.*$/LOGSIZE/&#x27; $GBASEDBTDIR/etc/$ONCONFIG</span><br><span class="line">oninit -ivy</span><br><span class="line"></span><br><span class="line">onspaces -c -d plogdbs -p /opt/data/plogdbs -o 0 -s 10000 </span><br><span class="line">onspaces -c -d llogdbs -p /opt/data/llogdbs -o 0 -s 10000 </span><br><span class="line">onspaces -c -d tmpdbs01 -p /opt/data/tmpdbs01 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d tmpdbs02 -p /opt/data/tmpdbs02 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d tmpdbs03 -p /opt/data/tmpdbs03 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d tmpdbs04 -p /opt/data/tmpdbs04 -o 0 -s 10000 -t</span><br><span class="line">onspaces -c -d datadbs01 -p /opt/data/datachk01 -o 0 -k 16 -s `echo &quot;25600*16&quot;|bc`</span><br><span class="line"></span><br><span class="line">sleep 1;</span><br><span class="line">onmode -c</span><br><span class="line">ontape -s -L 0 -t /dev/null</span><br><span class="line"></span><br><span class="line">dbaccess - - &lt;&lt;!</span><br><span class="line">    create database db01 in datadbs01;</span><br><span class="line">!</span><br></pre></td></tr></table></figure>



<h4 id="手术台上的操作：创建一个t6表"><a href="#手术台上的操作：创建一个t6表" class="headerlink" title="手术台上的操作：创建一个t6表"></a>手术台上的操作：创建一个t6表</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">创建一个空的t6表</span></span><br><span class="line">dbaccess db01 &lt;&lt;!</span><br><span class="line">	create table t6(id int,name varchar(20), addr char(10)) </span><br><span class="line">    extent size 64 next size 128;</span><br><span class="line">!</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">现在t6表是没有数据的</span></span><br><span class="line">dbaccess db01 &lt;&lt;!</span><br><span class="line">	select * from t6;</span><br><span class="line">!</span><br></pre></td></tr></table></figure>



<h4 id="手术台上的操作：观察新实例的数据页情况"><a href="#手术台上的操作：观察新实例的数据页情况" class="headerlink" title="手术台上的操作：观察新实例的数据页情况"></a>手术台上的操作：观察新实例的数据页情况</h4><pre><code>    关闭数据库，下载新t6表的partation页，查看新t6表的数据页分配情况。如果没有分配可以随意插入数据再truncat掉，尽量保证页分配数和老生产环境一致。
</code></pre>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line">onmode -ky</span><br><span class="line">onclean -ky</span><br><span class="line">mkdir /home/gbasedbt/GBase8sL3/new</span><br><span class="line">cd /home/gbasedbt/GBase8sL3/new</span><br><span class="line">cp -a ../dumpTBLSpaceAndPE.sh ./</span><br><span class="line">cp -a ../dumpPEpage.sh ./</span><br><span class="line">cp -a ../dd1 ./</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">[gbasedbt@wei07 new]$ ./dumpPEpage.sh</span></span><br><span class="line">if=/opt/data/datachk01 of=datapageDIR/db01:t6_583 skip=9328 seed=0 bs=1024 count=16 itw=1 otw=1</span><br><span class="line">if=/opt/data/datachk01 of=datapageDIR/db01:t6_584 skip=9344 seed=0 bs=1024 count=16 itw=1 otw=1</span><br><span class="line">if=/opt/data/datachk01 of=datapageDIR/db01:t6_585 skip=9360 seed=0 bs=1024 count=16 itw=1 otw=1</span><br><span class="line">if=/opt/data/datachk01 of=datapageDIR/db01:t6_586 skip=9376 seed=0 bs=1024 count=16 itw=1 otw=1</span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">[gbasedbt@wei07 new]$ ./dumpTBLSpaceAndPE</span></span><br><span class="line">请输入你要抢救数据的表所在的数据库名称：</span><br><span class="line">db01</span><br><span class="line">请输入你要抢救数据的表名称：</span><br><span class="line">t6</span><br><span class="line">0000000: f008 0000 0800 5fd4 0538 0208 e000 083f 0000 0000 0000 0000 4700 8000 0209 0000 2400 0000 0100 0000 0100 0040 cc07 8364 0100 0000 2000 0000 4000 0000 0400 0000 0100 0000 0000 0000 ffff ffff 4700 8000 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0100 0000 0000 0000 0100 0000 0100 0000 0000 0000 0100 0000 0100 0000 78c1 c302 0000 0000 0000 0000 0000 0000 6462 3031 0067 6261 7365 6462 7400 7436 007a 685f 434e 2e35 3733 3732 0000 0000 0400 0000 0000 1400 0000 0005 0000 0000 0008 0000 1238 0000 0004 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000  ......_..8.....?........G.......$..........@...d.... ...@...................G...................................................................x...............db01.gbasedbt.t6.zh_CN.57372.........................8..........................................</span><br><span class="line">这个文件就是你要找的partation页！！！  partationDIR/0x0000011e</span><br><span class="line">20+0 records in</span><br><span class="line">20+0 records out</span><br><span class="line">20 bytes (20 B) copied, 0.000140423 s, 142 kB/s</span><br><span class="line">10+0 records in</span><br><span class="line">10+0 records out</span><br><span class="line">10 bytes (10 B) copied, 0.000122007 s, 82.0 kB/s</span><br><span class="line">16 2</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">DBspace Usage Report: db01           Owner: wangwei  Created: 05/09/2022</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"> Chunk Pathname                             Pagesize(k)  Size(p)  Used(p)  Free(p)</span><br><span class="line">     8 /opt/data/datachk01                           16   xxxxx     xxxxx   xxxxx</span><br><span class="line"></span><br><span class="line"> Description                                                   Offset(p)  Size(p)</span><br><span class="line"> ------------------------------------------------------------- -------- --------</span><br><span class="line"> RESERVED PAGES                                                       0        2</span><br><span class="line"> CHUNK FREELIST PAGE                                                  2        1</span><br><span class="line"> db01:t6                                                            583        4</span><br><span class="line"></span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h4 id="手术台上的操作：修改partation页"><a href="#手术台上的操作：修改partation页" class="headerlink" title="手术台上的操作：修改partation页"></a>手术台上的操作：修改partation页</h4><h5 id="partation页：对比"><a href="#partation页：对比" class="headerlink" title="partation页：对比"></a>partation页：对比</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line">mkdir diffDir</span><br><span class="line">xxd ../partationDIR/0x00000122 &gt; diffDir/old.partn</span><br><span class="line">xxd ./partationDIR/0x0000011e  &gt; diffDir/new.partn</span><br><span class="line">diff diffDir/old.partn diffDir/new.partn</span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ diff diffDir/old.partn diffDir/new.partn</span><br><span class="line">1,3c1,3</span><br><span class="line">&lt; 0000000: 1009 0000 0800 5aff 0538 0208 e000 083f  ......Z..8.....?</span><br><span class="line">&lt; 0000010: 0000 0000 0000 0000 4b00 8000 0209 0000  ........K.......</span><br><span class="line">&lt; 0000020: 2400 0000 0100 0000 0100 0040 47f1 8264  $..........@G..d</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000000: f008 0000 0800 5fd4 0538 0208 e000 083f  ......_..8.....?</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000010: 0000 0000 0000 0000 4700 8000 0209 0000  ........G.......</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000020: 2400 0000 0100 0000 0100 0040 cc07 8364  $..........@...d</span></span><br><span class="line">5,6c5,6</span><br><span class="line">&lt; 0000040: 0200 0000 0100 0000 ffff ffff 4b00 8000  ............K...</span><br><span class="line">&lt; 0000050: 0100 0000 0000 0000 0a00 0000 0000 0000  ................</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000040: 0100 0000 0000 0000 ffff ffff 4700 8000  ............G...</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000050: 0100 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line">8c8</span><br><span class="line">&lt; 0000070: 0a00 0000 0100 0000 0000 0000 0100 0000  ................</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000070: 0000 0000 0100 0000 0000 0000 0100 0000  ................</span></span><br><span class="line">10c10</span><br><span class="line">&lt; 0000090: bc87 3f02 0000 0000 0000 0000 0000 0000  ..?.............</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000090: 78c1 c302 0000 0000 0000 0000 0000 0000  x...............</span></span><br><span class="line">14c14</span><br><span class="line">&lt; 00000d0: 0008 0000 12b8 0000 0004 0000 0000 0000  ................</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000d0: 0008 0000 1238 0000 0004 0000 0000 0000  .....8..........</span></span><br><span class="line">1024c1024</span><br><span class="line">&lt; 0003ff0: c000 0c00 a000 2000 1800 8800 40f6 0200  ...... .....@...</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0003ff0: c000 0c00 a000 2000 1800 8800 a5dc 0200  ...... .........</span></span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h5 id="partation页：覆盖槽位1"><a href="#partation页：覆盖槽位1" class="headerlink" title="partation页：覆盖槽位1"></a>partation页：覆盖槽位1</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">0x08f0 = 2288</span></span><br><span class="line">if=../partationDIR/0x00000122</span><br><span class="line">of=/opt/data/datachk01</span><br><span class="line">let skip=24</span><br><span class="line">let seek=2288*2*1024+24</span><br><span class="line">let bs=1</span><br><span class="line">let count=136</span><br><span class="line">dd1 $if $of $skip $seek $bs $count 1 1</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash"> 242: Could not open database table (root.t7).</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash"> 135: ISAM error: TBLspace does not exist</span></span><br></pre></td></tr></table></figure>

<h5 id="partation页：细修槽位1-partnum和lockid"><a href="#partation页：细修槽位1-partnum和lockid" class="headerlink" title="partation页：细修槽位1-partnum和lockid"></a>partation页：细修槽位1-partnum和lockid</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">0x08f0 = 2288</span></span><br><span class="line">if=./partationDIR/0x0000011e</span><br><span class="line">of=/opt/data/datachk01</span><br><span class="line">let skip=24</span><br><span class="line">let seek=2288*2*1024+24</span><br><span class="line">let bs=1</span><br><span class="line">let count=4</span><br><span class="line">dd1 $if $of $skip $seek $bs $count 1 1</span><br><span class="line"></span><br><span class="line">if=./partationDIR/0x0000011e</span><br><span class="line">of=/opt/data/datachk01</span><br><span class="line">let skip=24</span><br><span class="line">let seek=2288*2*1024+24+52</span><br><span class="line">let bs=1</span><br><span class="line">let count=4</span><br><span class="line">dd1 $if $of $skip $seek $bs $count 1 1</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash"> 244: Could not <span class="keyword">do</span> a physical-order <span class="built_in">read</span> to fetch next row.</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash"> 105: ISAM error:  bad isam file format.</span></span><br></pre></td></tr></table></figure>





<h4 id="手术台上的操作：修改bitmap页"><a href="#手术台上的操作：修改bitmap页" class="headerlink" title="手术台上的操作：修改bitmap页"></a>手术台上的操作：修改bitmap页</h4><h5 id="bitmap页：对比"><a href="#bitmap页：对比" class="headerlink" title="bitmap页：对比"></a>bitmap页：对比</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line">mkdir -p diffDir</span><br><span class="line">xxd ../datapageDIR/db01:t6_599 &gt; diffDir/old.bitmap</span><br><span class="line">xxd ./datapageDIR/db01:t6_583  &gt; diffDir/new.bitmap</span><br><span class="line">diff diffDir/old.bitmap diffDir/new.bitmap</span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ diff diffDir/old.bitmap diffDir/new.bitmap</span><br><span class="line">1,2c1,2</span><br><span class="line">&lt; 0000000: b812 0000 0800 bae4 0038 0408 1800 e43f  .........8.....?</span><br><span class="line">&lt; 0000010: 0000 0000 0000 0000 0100 0000 0200 0000  ................</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000000: 3812 0000 0800 4ace 0038 0408 1800 e43f  8.....J..8.....?</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000010: 0000 0000 0000 0000 0100 0000 0000 0000  ................</span></span><br><span class="line">1024c1024</span><br><span class="line">&lt; 0003ff0: 0000 0000 0000 0000 0000 0000 08f6 0200  ................</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0003ff0: 0000 0000 0000 0000 0000 0000 78dc 0200  ............x...</span></span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h5 id="bitmap页：修改0x0000010"><a href="#bitmap页：修改0x0000010" class="headerlink" title="bitmap页：修改0x0000010"></a>bitmap页：修改0x0000010</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">按字节修改</span></span><br><span class="line">let seed=583*16*1024+24</span><br><span class="line">dd1 ../datapageDIR/db01:t6_599 /opt/data/datachk01 24 $seed 1 8 1 1</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">修改完成后导入一份对比一下</span></span><br><span class="line">dd1 /opt/data/datachk01 tmp 9328 0 1024 16 1 1</span><br><span class="line">xxd tmp  &gt; diffDir/new.bitmap_1</span><br><span class="line">diff diffDir/old.bitmap diffDir/new.bitmap_1</span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ diff diffDir/old.bitmap diffDir/new.bitmap_1</span><br><span class="line">1c1</span><br><span class="line">&lt; 0000000: b812 0000 0800 bae4 0038 0408 1800 e43f  .........8.....?</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000000: 3812 0000 0800 4ace 0038 0408 1800 e43f  8.....J..8.....?</span></span><br><span class="line">1024c1024</span><br><span class="line">&lt; 0003ff0: 0000 0000 0000 0000 0000 0000 08f6 0200  ................</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0003ff0: 0000 0000 0000 0000 0000 0000 78dc 0200  ............x...</span></span><br><span class="line">[gbasedbt@wei07 new]$ dbaccess db01 &lt;&lt;!</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash"><span class="keyword">select</span> * from t6;</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">!</span></span><br><span class="line">Database selected.</span><br><span class="line">         id name                 addr</span><br><span class="line">No rows found.</span><br><span class="line">Database closed.</span><br><span class="line">[gbasedbt@wei07 new]$ oncheck -pp 8388679 0</span><br><span class="line">addr             stamp    chksum nslots flag type         frptr frcnt next     prev</span><br><span class="line">8:4664           187512   ce4a   0      804  FREE         24    16356 0        0</span><br><span class="line">   0:8 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</span><br><span class="line"></span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h4 id="手术台上的操作：修改data页"><a href="#手术台上的操作：修改data页" class="headerlink" title="手术台上的操作：修改data页"></a>手术台上的操作：修改data页</h4><h5 id="data页：对比"><a href="#data页：对比" class="headerlink" title="data页：对比"></a>data页：对比</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line">mkdir -p diffDir</span><br><span class="line">xxd ../datapageDIR/db01:t6_600 &gt; diffDir/old.data</span><br><span class="line">xxd ./datapageDIR/db01:t6_584  &gt; diffDir/new.data</span><br><span class="line">diff diffDir/old.data diffDir/new.data</span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ diff diffDir/old.data diffDir/new.data</span><br><span class="line">1,16c1,16</span><br><span class="line">&lt; 0000000: c012 0000 0800 fce4 0a38 0108 f400 e03e  .........8.....&gt;</span><br><span class="line">&lt; 0000010: 0000 0000 0000 0000 0000 0001 0006 6162  ..............ab</span><br><span class="line">&lt; 0000020: 6364 6566 6162 6364 6566 3120 2020 0000  cdefabcdef1   ..</span><br><span class="line">&lt; 0000030: 0002 0006 6162 6364 6566 6162 6364 6566  ....abcdefabcdef</span><br><span class="line">&lt; 0000040: 3220 2020 0000 0003 0006 6162 6364 6566  2   ......abcdef</span><br><span class="line">&lt; 0000050: 6162 6364 6566 3320 2020 0000 0004 0006  abcdef3   ......</span><br><span class="line">&lt; 0000060: 6162 6364 6566 6162 6364 6566 3420 2020  abcdefabcdef4</span><br><span class="line">&lt; 0000070: 0000 0005 0006 6162 6364 6566 6162 6364  ......abcdefabcd</span><br><span class="line">&lt; 0000080: 6566 3520 2020 0000 0006 0006 6162 6364  ef5   ......abcd</span><br><span class="line">&lt; 0000090: 6566 6162 6364 6566 3620 2020 0000 0007  efabcdef6   ....</span><br><span class="line">&lt; 00000a0: 0006 6162 6364 6566 6162 6364 6566 3720  ..abcdefabcdef7</span><br><span class="line">&lt; 00000b0: 2020 0000 0008 0006 6162 6364 6566 6162    ......abcdefab</span><br><span class="line">&lt; 00000c0: 6364 6566 3820 2020 0000 0009 0006 6162  cdef8   ......ab</span><br><span class="line">&lt; 00000d0: 6364 6566 6162 6364 6566 3920 2020 0000  cdefabcdef9   ..</span><br><span class="line">&lt; 00000e0: 000a 0006 6162 6364 6566 6162 6364 6566  ....abcdefabcdef</span><br><span class="line">&lt; 00000f0: 3130 2020 0000 0000 0000 0000 0000 0000  10  ............</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">00000f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line">1022,1024c1022,1024</span><br><span class="line">&lt; 0003fd0: 0000 0000 de00 1600 c800 1600 b200 1600  ................</span><br><span class="line">&lt; 0003fe0: 9c00 1600 8600 1600 7000 1600 5a00 1600  ........p...Z...</span><br><span class="line">&lt; 0003ff0: 4400 1600 2e00 1600 1800 1600 36f6 0200  D...........6...</span><br><span class="line">---</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0003fd0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0003fe0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">0003ff0: 0000 0000 0000 0000 0000 0000 0000 0000  ................</span></span><br><span class="line">[gbasedbt@wei07 new]$</span><br></pre></td></tr></table></figure>

<h5 id="data页：覆盖"><a href="#data页：覆盖" class="headerlink" title="data页：覆盖"></a>data页：覆盖</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">按字节修改</span></span><br><span class="line">let seed=584*16*1024</span><br><span class="line">dd1 ../datapageDIR/db01:t6_600 /opt/data/datachk01 0 $seed 1 16384 1 1</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">修改完成后导入一份对比一下</span></span><br><span class="line">dd1 /opt/data/datachk01 tmp 9344 0 1024 16 1 1</span><br><span class="line">xxd tmp  &gt; diffDir/new.data_1</span><br><span class="line">diff diffDir/old.data diffDir/new.data_1</span><br></pre></td></tr></table></figure>

<h5 id="data页：此时会遇到页地址pg-addr错误"><a href="#data页：此时会遇到页地址pg-addr错误" class="headerlink" title="data页：此时会遇到页地址pg_addr错误"></a>data页：此时会遇到页地址pg_addr错误</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ oncheck -cD 8388679</span><br><span class="line"></span><br><span class="line">TBLspace data check for db01:gbasedbt.t6</span><br><span class="line"></span><br><span class="line">BAD PAGE 8:4672: pg_addr 8:4800 != bp-&gt;bf_pagenum 8:4672</span><br><span class="line">WARNING: Modifying TBLspace statistics(pn_nrows):  OLD 10  NEW 0</span><br><span class="line">Reset partition data?</span><br><span class="line">[gbasedbt@wei07 new]$ oncheck -pP 8 4672</span><br><span class="line">addr             stamp    chksum nslots flag type         frptr frcnt next     prev</span><br><span class="line">8:4800           194102   e4fc   10     801  DATA         244   16096 0        0</span><br><span class="line">        slot ptr   len   flg</span><br><span class="line">        1    24    22    0</span><br><span class="line">        2    46    22    0</span><br><span class="line">        3    68    22    0</span><br><span class="line">        4    90    22    0</span><br><span class="line">        5    112   22    0</span><br><span class="line">        6    134   22    0</span><br><span class="line">        7    156   22    0</span><br><span class="line">        8    178   22    0</span><br><span class="line">        9    200   22    0</span><br><span class="line">        10   222   22    0</span><br><span class="line">slot   1:</span><br><span class="line">    0:  0  0  0  1  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 31 20 20 20                                 ef1   ..........</span><br><span class="line">slot   2:</span><br><span class="line">    0:  0  0  0  2  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 32 20 20 20                                 ef2   ..........</span><br><span class="line">slot   3:</span><br><span class="line">    0:  0  0  0  3  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 33 20 20 20                                 ef3   ..........</span><br><span class="line">slot   4:</span><br><span class="line">    0:  0  0  0  4  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 34 20 20 20                                 ef4   ..........</span><br><span class="line">slot   5:</span><br><span class="line">    0:  0  0  0  5  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 35 20 20 20                                 ef5   ..........</span><br><span class="line">slot   6:</span><br><span class="line">    0:  0  0  0  6  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 36 20 20 20                                 ef6   ..........</span><br><span class="line">slot   7:</span><br><span class="line">    0:  0  0  0  7  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 37 20 20 20                                 ef7   ..........</span><br><span class="line">slot   8:</span><br><span class="line">    0:  0  0  0  8  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 38 20 20 20                                 ef8   ..........</span><br><span class="line">slot   9:</span><br><span class="line">    0:  0  0  0  9  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 39 20 20 20                                 ef9   ..........</span><br><span class="line">slot  10:</span><br><span class="line">    0:  0  0  0  a  0  6 61 62 63 64 65 66 61 62 63 64   ......abcdefabcd</span><br><span class="line">   16: 65 66 31 30 20 20                                 ef10  ..........</span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h5 id="data页：细修-页地址"><a href="#data页：细修-页地址" class="headerlink" title="data页：细修-页地址"></a>data页：细修-页地址</h5><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdlib.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;string.h&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="keyword">typedef</span> <span class="class"><span class="keyword">struct</span> <span class="title">Addr</span>&#123;</span></span><br><span class="line">    <span class="type">int</span> page2k;</span><br><span class="line">&#125; ADDR;</span><br><span class="line"></span><br><span class="line"><span class="comment">//页地址等于上一页的地址+8  :addr=4664+8</span></span><br><span class="line"><span class="type">void</span> <span class="title function_">main</span><span class="params">(<span class="type">void</span>)</span>&#123;</span><br><span class="line">    <span class="type">int</span> i=<span class="number">4664</span>;</span><br><span class="line">    i+=<span class="number">8</span>;</span><br><span class="line">    ADDR addr;</span><br><span class="line">    addr.page2k=i;</span><br><span class="line">    FILE *fp;</span><br><span class="line">    fp = fopen(<span class="string">&quot;tmp.addr&quot;</span>,<span class="string">&quot;wb&quot;</span>);</span><br><span class="line">    fwrite(&amp;addr,<span class="keyword">sizeof</span>(ADDR),<span class="number">1</span>,fp);</span><br><span class="line">    fclose(fp);</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">修复address</span></span><br><span class="line">let seed=584*16*1024</span><br><span class="line">dd1 ../tmp.addr /opt/data/datachk01 0 $seed 1 4 1 1</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">验证</span></span><br><span class="line">dd1 /opt/data/datachk01 tmp $seed 0 1 16384 1 1</span><br><span class="line">xxd tmp</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h5 id="data页：此时会遇到CHECKSUM错误"><a href="#data页：此时会遇到CHECKSUM错误" class="headerlink" title="data页：此时会遇到CHECKSUM错误"></a>data页：此时会遇到CHECKSUM错误</h5><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ oncheck -cD 8388679</span><br><span class="line"></span><br><span class="line">TBLspace data check for db01:gbasedbt.t6</span><br><span class="line"></span><br><span class="line">BAD PAGE 8:4672: pg_chksum 0xe4fc != PG_CHECKSUM 0xe47c</span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line">[gbasedbt@wei07 new]$ xxd tmp |grep fce4</span><br><span class="line">0000000: 4012 0000 0800 fce4 0a38 0108 f400 e03e  @........8.....&gt;</span><br><span class="line">[gbasedbt@wei07 new]$   fce4 </span><br><span class="line"></span><br></pre></td></tr></table></figure>

<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdio.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;stdlib.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;string.h&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="keyword">typedef</span> <span class="class"><span class="keyword">struct</span> <span class="title">Addr</span>&#123;</span></span><br><span class="line">    <span class="type">short</span> page2k;</span><br><span class="line">&#125; ADDR;</span><br><span class="line"></span><br><span class="line"><span class="comment">//页地址等于上一页的地址+8  :addr=4664+8</span></span><br><span class="line"><span class="type">void</span> <span class="title function_">main</span><span class="params">(<span class="type">void</span>)</span>&#123;</span><br><span class="line">    <span class="type">int</span> i=<span class="number">0xe47c</span>;</span><br><span class="line">    ADDR addr;</span><br><span class="line">    addr.page2k=i;</span><br><span class="line">    FILE *fp;</span><br><span class="line">    fp = fopen(<span class="string">&quot;tmp.addr&quot;</span>,<span class="string">&quot;wb&quot;</span>);</span><br><span class="line">    fwrite(&amp;addr,<span class="keyword">sizeof</span>(ADDR),<span class="number">1</span>,fp);</span><br><span class="line">    fclose(fp);</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash"><span class="built_in">cd</span> new</span></span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">修复checksum</span></span><br><span class="line">let seed=584*16*1024+6</span><br><span class="line">dd1 ../tmp.addr /opt/data/datachk01 0 $seed 1 2 1 1</span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash">验证</span></span><br><span class="line">rm tmp;touch tmp;</span><br><span class="line">let seed=584*16*1024</span><br><span class="line">dd1 /opt/data/datachk01 tmp $seed 0 1 16 1 1</span><br><span class="line">xxd tmp</span><br></pre></td></tr></table></figure>

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">上面操作的日志记录：</span></span><br><span class="line">[gbasedbt@wei07 new]$ xxd tmp |grep fce4</span><br><span class="line">0000000: 4012 0000 0800 fce4 0a38 0108 f400 e03e  @........8.....&gt;</span><br><span class="line">[gbasedbt@wei07 new]$ let seed=584*16*1024+6</span><br><span class="line">[gbasedbt@wei07 new]$ dd1 ../tmp.addr /opt/data/datachk01 0 $seed 1 2 1 1</span><br><span class="line">if=../tmp.addr of=/opt/data/datachk01 skip=0 seed=9568262 bs=1 count=2 itw=1 otw=1</span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line">[gbasedbt@wei07 new]$ rm tmp;touch tmp;</span><br><span class="line">[gbasedbt@wei07 new]$ dd1 /opt/data/datachk01 tmp $seed 0 1 16 1 1</span><br><span class="line">if=/opt/data/datachk01 of=tmp skip=9568262 seed=0 bs=1 count=16 itw=1 otw=1</span><br><span class="line">[gbasedbt@wei07 new]$ xxd tmp</span><br><span class="line">0000000: 7ce4 0a38 0108 f400 e03e 0000 0000 0000  |..8.....&gt;......</span><br><span class="line">[gbasedbt@wei07 new]$ rm tmp;touch tmp;</span><br><span class="line">[gbasedbt@wei07 new]$ let seed=584*16*1024</span><br><span class="line">[gbasedbt@wei07 new]$ dd1 /opt/data/datachk01 tmp $seed 0 1 16 1 1</span><br><span class="line">if=/opt/data/datachk01 of=tmp skip=9568256 seed=0 bs=1 count=16 itw=1 otw=1</span><br><span class="line">[gbasedbt@wei07 new]$ xxd tmp</span><br><span class="line">0000000: 4012 0000 0800 7ce4 0a38 0108 f400 e03e  @.....|..8.....&gt;</span><br><span class="line">[gbasedbt@wei07 new]$ oninit -v</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash">启动数据库，查询OK啦 ^_^</span></span><br><span class="line">[gbasedbt@wei07 new]$ oninit</span><br><span class="line">[gbasedbt@wei07 new]$ dbaccess db01 &lt;&lt;!</span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash"><span class="keyword">select</span> * from t6;</span></span><br><span class="line"><span class="meta prompt_">&gt; </span><span class="language-bash">!</span></span><br><span class="line"></span><br><span class="line">Database selected.</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">         id name                 addr</span><br><span class="line"></span><br><span class="line">          1 abcdef               abcdef1</span><br><span class="line">          2 abcdef               abcdef2</span><br><span class="line">          3 abcdef               abcdef3</span><br><span class="line">          4 abcdef               abcdef4</span><br><span class="line">          5 abcdef               abcdef5</span><br><span class="line">          6 abcdef               abcdef6</span><br><span class="line">          7 abcdef               abcdef7</span><br><span class="line">          8 abcdef               abcdef8</span><br><span class="line">          9 abcdef               abcdef9</span><br><span class="line">         10 abcdef               abcdef10</span><br><span class="line"></span><br><span class="line">10 row(s) retrieved.</span><br><span class="line"></span><br><span class="line">Elapsed time: 0.175 sec</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">Database closed.</span><br><span class="line"></span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h4 id="最后一次检查"><a href="#最后一次检查" class="headerlink" title="最后一次检查"></a>最后一次检查</h4><p>此时再做一次oncheck检查，会发现partnum页的pn_nrows页还是0不是10，需要对其修复一下，直接按y修复即可。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">[gbasedbt@wei07 new]$ oncheck -cD 8388679</span><br><span class="line"></span><br><span class="line">TBLspace data check for db01:gbasedbt.t6</span><br><span class="line"></span><br><span class="line">WARNING: Modifying TBLspace statistics(pn_nrows):  OLD 0  NEW 10</span><br><span class="line">Reset partition data? y</span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line">[gbasedbt@wei07 new]$ oncheck -cD 8388679</span><br><span class="line"></span><br><span class="line">TBLspace data check for db01:gbasedbt.t6</span><br><span class="line"></span><br><span class="line">[gbasedbt@wei07 new]$</span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="导数数据创建新生产"><a href="#导数数据创建新生产" class="headerlink" title="导数数据创建新生产"></a>导数数据创建新生产</h2><pre><code>    略...
</code></pre>
<h2 id="总结："><a href="#总结：" class="headerlink" title="总结："></a>总结：</h2><pre><code>    这里恢复方式是不得已的情况下使用，生产环境请做好数据安全和备份工作。

    实在不能全量备份，最起码请做好下&quot;dbspaces空间规划&quot;和&quot;库表结构&quot;的备份。
</code></pre>
 
      <!-- reward -->
      
    </div>
    

    <!-- copyright -->
    
    <div class="declare">
      <ul class="post-copyright">
        <li>
          <i class="ri-copyright-line"></i>
          <strong>Copyright： </strong>
          
          Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
          
        </li>
      </ul>
    </div>
    
    <footer class="article-footer">
       
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=http://example.com/2023/06/15/%E8%87%AA%E5%88%B6%E5%B7%A5%E5%85%B7%EF%BC%9AGBase8s%E5%85%B3%E6%9C%BA%E7%8A%B6%E6%80%81%E4%B8%8B%E5%AF%BC%E5%87%BA%E6%9F%90%E4%B8%AA%E8%A1%A8%E7%9A%84%E5%85%A8%E9%87%8F%E6%95%B0%E6%8D%AE/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>  
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/GBase8s/" rel="tag">GBase8s</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/level3/" rel="tag">level3</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/%E8%87%AA%E7%A0%94/" rel="tag">自研</a></li></ul>

    </footer>
  </div>

   
  <nav class="article-nav">
    
      <a href="/2023/06/23/GBase8s%E6%95%B0%E6%8D%AE%E5%BA%93Docker%E9%95%9C%E5%83%8F%E7%9A%84%E8%8E%B7%E5%8F%96%E4%B8%8E%E5%AE%9A%E5%88%B6%E4%BD%BF%E7%94%A8/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            GBase8s数据库Docker镜像的获取与定制使用
          
        </div>
      </a>
    
    
      <a href="/2023/06/15/%E8%87%AA%E5%88%B6%E5%B7%A5%E5%85%B7%EF%BC%9AdumpPEpage-sh/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">自制工具：dumpPEpage.sh</div>
      </a>
    
  </nav>

  
   
  
    
</article>

</section>
      <footer class="footer">
  <div class="outer">
    <ul>
      <li>
        Copyrights &copy;
        2023-2024
        <i class="ri-heart-fill heart_icon"></i> Wang Wei
      </li>
    </ul>
    <ul>
      <li>
        
      </li>
    </ul>
    <ul>
      <li>
        
        
        <span>
  <span><i class="ri-user-3-fill"></i>Visitors:<span id="busuanzi_value_site_uv"></span></span>
  <span class="division">|</span>
  <span><i class="ri-eye-fill"></i>Views:<span id="busuanzi_value_page_pv"></span></span>
</span>
        
      </li>
    </ul>
    <ul>
      
    </ul>
    <ul>
      
    </ul>
    <ul>
      <li>
        <!-- cnzz统计 -->
        
      </li>
    </ul>
  </div>
</footer>    
    </main>
    <div class="float_btns">
      <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>

    </div>
    <aside class="sidebar on">
      <button class="navbar-toggle"></button>
<nav class="navbar">
  
  <div class="logo">
    <a href="/"><img src="/images/ww.ico" alt="朝花夕拾"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
    </aside>
    <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
    
<script src="/js/jquery-3.6.0.min.js"></script>
 
<script src="/js/lazyload.min.js"></script>

<!-- Tocbot -->
 
<script src="/js/tocbot.min.js"></script>

<script>
  tocbot.init({
    tocSelector: ".tocbot",
    contentSelector: ".article-entry",
    headingSelector: "h1, h2, h3, h4, h5, h6",
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer: "main",
    positionFixedSelector: ".tocbot",
    positionFixedClass: "is-position-fixed",
    fixedSidebarOffset: "auto",
  });
</script>

<script src="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.js"></script>
<link
  rel="stylesheet"
  href="https://cdn.staticfile.org/jquery-modal/0.9.2/jquery.modal.min.css"
/>
<script src="https://cdn.staticfile.org/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js"></script>

<script src="/dist/main.js"></script>

<!-- ImageViewer -->

<!-- MathJax -->

<!-- Katex -->

<!-- busuanzi  -->
 
<script src="/js/busuanzi-2.3.pure.min.js"></script>
 
<!-- ClickLove -->

<!-- ClickBoom1 -->

<!-- ClickBoom2 -->

<!-- CodeCopy -->
 
<link rel="stylesheet" href="/css/clipboard.css">
 <script src="https://cdn.staticfile.org/clipboard.js/2.0.10/clipboard.min.js"></script>
<script>
  function wait(callback, seconds) {
    var timelag = null;
    timelag = window.setTimeout(callback, seconds);
  }
  !function (e, t, a) {
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '<i class="ri-file-copy-2-line"></i><span>COPY</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      $(".article pre code").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });
      clipboard.on('success', function(e) {
        let $btn = $(e.trigger);
        $btn.addClass('copied');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-checkbox-circle-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPIED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-checkbox-circle-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
      clipboard.on('error', function(e) {
        e.clearSelection();
        let $btn = $(e.trigger);
        $btn.addClass('copy-failed');
        let $icon = $($btn.find('i'));
        $icon.removeClass('ri-file-copy-2-line');
        $icon.addClass('ri-time-line');
        let $span = $($btn.find('span'));
        $span[0].innerText = 'COPY FAILED';
        
        wait(function () { // 等待两秒钟后恢复
          $icon.removeClass('ri-time-line');
          $icon.addClass('ri-file-copy-2-line');
          $span[0].innerText = 'COPY';
        }, 2000);
      });
    }
    initCopyCode();
  }(window, document);
</script>
 
<!-- CanvasBackground -->

<script>
  if (window.mermaid) {
    mermaid.initialize({ theme: "forest" });
  }
</script>


    
    

  </div>
</body>

</html>